package com.act;

import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ProgressBar;
import android.widget.TextView;

import com.common.Constant;
import com.xike.kyt.R;
import com.xike.util.MLog;
import com.xike.util.MyUtil;
import com.xike.util.StringUtil;

public class AgreementAct extends BaseAct implements OnClickListener {
	WebView webView;
	TextView tv_title;
	TextView tv_back, tv_close;
	ProgressBar pb_loading;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.act_webview);

		initViews();
	}

	@Override
	protected void initViews() {
		tv_back = (TextView) findViewById(R.id.headTitle_tv_back);
		tv_back.setVisibility(View.VISIBLE);
		tv_back.setOnClickListener(this);

		tv_close = (TextView) findViewById(R.id.layoutTitle_tv_close);
		tv_close.setVisibility(View.GONE);

		tv_title = (TextView) findViewById(R.id.headTitle_tvTitle);
		tv_title.setText("注册协议");

		pb_loading = (ProgressBar) findViewById(R.id.layoutTitle_pb_loading);
		pb_loading.setVisibility(View.GONE);

		webView = (WebView) findViewById(R.id.webView);
		WebSettings webSettings = webView.getSettings();
		webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE);
		webSettings.setJavaScriptEnabled(true);
		webSettings.setDefaultTextEncodingName("UTF-8");

		webView.loadUrl("file:///android_asset/agreement.html ");

	}

	@Override
	protected void updateViews() {

	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.headTitle_tv_back:
			finish();
			break;
		default:
			break;
		}
	}

}
